from distutils.core import setup, Extension

INCLUDES = ['/Users/michael/virtualenvs/PYDEV/include/xmlsec1', '/Users/michael/virtualenvs/PYDEV/include/libxml2']
LIBDIRS = ['/Users/michael/virtualenvs/PYDEV/lib']
RUNDIRS = ['/Users/michael/virtualenvs/PYDEV/lib']
LIBS = ['xmlsec1', 'xslt', 'xml2']
LIBS = ['xmlsec1', 'xmlsec1-openssl']
LIBS = ['xmlsec1', 'dl']
#-DXMLSEC_CRYPTO=\\\"openssl\\\" -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1  -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_SIZE_T -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1
DEFINES = [('XMLSEC_CRYPTO', '"openssl"',), ('XMLSEC_CRYPTO_DYNAMIC_LOADING', 1,), ('__XMLSEC_FUNCTION__', '__FUNCTION__',), ('XMLSEC_NO_SIZE_T', None,), ('XMLSEC_NO_GOST', 1,), ('XMLSEC_NO_XKMS', 1,)]


# XMLSEC_CRYPTO_DYNAMIC_LOADING
setup(
    name="xmlsec1",
    version="1.0",
    ext_modules=[
        Extension(
            name = "xmlsec1",
            include_dirs = INCLUDES,
            define_macros = DEFINES,
            library_dirs = LIBDIRS,
            runtime_library_dirs = RUNDIRS,
            libraries = LIBS,
            sources = ["src/xmlsec.c", "src/util.c"],
            depends = [
                "src/pyxmlsec.h",
                "src/app.c",
                "src/base64.c",
                "src/bn.c",
                "src/buffer.c",
                "src/dl.c",
                "src/io.c",
                "src/keyinfo.c",
                "src/keys.c",
                "src/keysdata.c",
                "src/keysmngr.c",
                "src/list.c",
                "src/membuf.c",
                "src/nodeset.c",
                "src/parser.c",
                "src/templates.c",
                "src/transforms.c",
                "src/x509.c",
                "src/xmldsig.c",
                "src/xmlenc.c",
                "src/xmltree.c",
            ],
        )
    ]
)
